<?php
	
		$keywords = trim($_REQUEST['keywords']);	if(!$keywords){	 exit(' ');	}
	//	$back     = array( array('url'=>'1','title'=>"$keywords"));
		
		$con = mysql_connect('localhost', 'root','net114');
		if (!$con){ die('Could not connect: ' . mysql_error()); }
		mysql_query('SET NAMES gbk',$con);
		mysql_select_db('net114',$con);

		$sql    = "SELECT title from corp_keywords WHERE title LIKE '%".$keywords."%' order by occurs desc limit 0,8";
		$res    = mysql_query($sql,$con);

		while($row = @mysql_fetch_array($res, MYSQL_ASSOC )){
			 $back[] = array('url'=>'7', 'title'=>urlencode(iconv('gb2312','UTF-8',$row['title'])));
			}
		mysql_close($con);
	    exit(json_encode($back));

?>